.class Lorg/microemu/android/device/ui/AndroidTextBoxUI$1;
.super Ljava/lang/Object;
.source "AndroidTextBoxUI.java"

# interfaces
.implements Ljava/lang/Runnable;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lorg/microemu/android/device/ui/AndroidTextBoxUI;-><init>(Lorg/microemu/android/MicroEmulatorActivity;Ljavax/microedition/lcdui/TextBox;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lorg/microemu/android/device/ui/AndroidTextBoxUI;

.field final synthetic val$activity:Lorg/microemu/android/MicroEmulatorActivity;

.field final synthetic val$textBox:Ljavax/microedition/lcdui/TextBox;


# direct methods
.method constructor <init>(Lorg/microemu/android/device/ui/AndroidTextBoxUI;Lorg/microemu/android/MicroEmulatorActivity;Ljavax/microedition/lcdui/TextBox;)V
    .locals 0
    .parameter
    .parameter
    .parameter

    .prologue
    .line 55
    iput-object p1, p0, Lorg/microemu/android/device/ui/AndroidTextBoxUI$1;->this$0:Lorg/microemu/android/device/ui/AndroidTextBoxUI;

    iput-object p2, p0, Lorg/microemu/android/device/ui/AndroidTextBoxUI$1;->val$activity:Lorg/microemu/android/MicroEmulatorActivity;

    iput-object p3, p0, Lorg/microemu/android/device/ui/AndroidTextBoxUI$1;->val$textBox:Ljavax/microedition/lcdui/TextBox;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 6

    .prologue
    const/4 v5, 0x1

    const/4 v4, -0x1

    .line 57
    iget-object v1, p0, Lorg/microemu/android/device/ui/AndroidTextBoxUI$1;->this$0:Lorg/microemu/android/device/ui/AndroidTextBoxUI;

    new-instance v2, Landroid/widget/LinearLayout;

    iget-object v3, p0, Lorg/microemu/android/device/ui/AndroidTextBoxUI$1;->val$activity:Lorg/microemu/android/MicroEmulatorActivity;

    invoke-direct {v2, v3}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V

    iput-object v2, v1, Lorg/microemu/android/device/ui/AndroidTextBoxUI;->view:Landroid/view/View;

    .line 58
    iget-object v1, p0, Lorg/microemu/android/device/ui/AndroidTextBoxUI$1;->this$0:Lorg/microemu/android/device/ui/AndroidTextBoxUI;

    iget-object v1, v1, Lorg/microemu/android/device/ui/AndroidTextBoxUI;->view:Landroid/view/View;

    check-cast v1, Landroid/widget/LinearLayout;

    invoke-virtual {v1, v5}, Landroid/widget/LinearLayout;->setOrientation(I)V

    .line 59
    iget-object v1, p0, Lorg/microemu/android/device/ui/AndroidTextBoxUI$1;->this$0:Lorg/microemu/android/device/ui/AndroidTextBoxUI;

    iget-object v1, v1, Lorg/microemu/android/device/ui/AndroidTextBoxUI;->view:Landroid/view/View;

    new-instance v2, Landroid/widget/LinearLayout$LayoutParams;

    invoke-direct {v2, v4, v4}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V

    invoke-virtual {v1, v2}, Landroid/view/View;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 61
    iget-object v1, p0, Lorg/microemu/android/device/ui/AndroidTextBoxUI$1;->this$0:Lorg/microemu/android/device/ui/AndroidTextBoxUI;

    new-instance v2, Landroid/widget/TextView;

    iget-object v3, p0, Lorg/microemu/android/device/ui/AndroidTextBoxUI$1;->val$activity:Lorg/microemu/android/MicroEmulatorActivity;

    invoke-direct {v2, v3}, Landroid/widget/TextView;-><init>(Landroid/content/Context;)V

    iput-object v2, v1, Lorg/microemu/android/device/ui/AndroidTextBoxUI;->titleView:Landroid/widget/TextView;

    .line 62
    iget-object v1, p0, Lorg/microemu/android/device/ui/AndroidTextBoxUI$1;->this$0:Lorg/microemu/android/device/ui/AndroidTextBoxUI;

    iget-object v1, v1, Lorg/microemu/android/device/ui/AndroidTextBoxUI;->titleView:Landroid/widget/TextView;

    new-instance v2, Landroid/widget/LinearLayout$LayoutParams;

    const/4 v3, -0x2

    invoke-direct {v2, v4, v3}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V

    invoke-virtual {v1, v2}, Landroid/widget/TextView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 63
    iget-object v1, p0, Lorg/microemu/android/device/ui/AndroidTextBoxUI$1;->this$0:Lorg/microemu/android/device/ui/AndroidTextBoxUI;

    iget-object v1, v1, Lorg/microemu/android/device/ui/AndroidTextBoxUI;->titleView:Landroid/widget/TextView;

    invoke-virtual {v1}, Landroid/widget/TextView;->getContext()Landroid/content/Context;

    move-result-object v1

    sget-object v2, Landroid/R$styleable;->Theme:[I

    invoke-virtual {v1, v2}, Landroid/content/Context;->obtainStyledAttributes([I)Landroid/content/res/TypedArray;

    move-result-object v0

    .line 64
    .local v0, a:Landroid/content/res/TypedArray;
    iget-object v1, p0, Lorg/microemu/android/device/ui/AndroidTextBoxUI$1;->this$0:Lorg/microemu/android/device/ui/AndroidTextBoxUI;

    iget-object v1, v1, Lorg/microemu/android/device/ui/AndroidTextBoxUI;->titleView:Landroid/widget/TextView;

    iget-object v2, p0, Lorg/microemu/android/device/ui/AndroidTextBoxUI$1;->this$0:Lorg/microemu/android/device/ui/AndroidTextBoxUI;

    iget-object v2, v2, Lorg/microemu/android/device/ui/AndroidTextBoxUI;->titleView:Landroid/widget/TextView;

    invoke-virtual {v2}, Landroid/widget/TextView;->getContext()Landroid/content/Context;

    move-result-object v2

    const/16 v3, 0x10

    invoke-virtual {v0, v3, v4}, Landroid/content/res/TypedArray;->getResourceId(II)I

    move-result v3

    invoke-virtual {v1, v2, v3}, Landroid/widget/TextView;->setTextAppearance(Landroid/content/Context;I)V

    .line 65
    iget-object v1, p0, Lorg/microemu/android/device/ui/AndroidTextBoxUI$1;->this$0:Lorg/microemu/android/device/ui/AndroidTextBoxUI;

    iget-object v1, v1, Lorg/microemu/android/device/ui/AndroidTextBoxUI;->view:Landroid/view/View;

    check-cast v1, Landroid/widget/LinearLayout;

    iget-object v2, p0, Lorg/microemu/android/device/ui/AndroidTextBoxUI$1;->this$0:Lorg/microemu/android/device/ui/AndroidTextBoxUI;

    iget-object v2, v2, Lorg/microemu/android/device/ui/AndroidTextBoxUI;->titleView:Landroid/widget/TextView;

    invoke-virtual {v1, v2}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V

    .line 67
    iget-object v1, p0, Lorg/microemu/android/device/ui/AndroidTextBoxUI$1;->this$0:Lorg/microemu/android/device/ui/AndroidTextBoxUI;

    new-instance v2, Landroid/widget/EditText;

    iget-object v3, p0, Lorg/microemu/android/device/ui/AndroidTextBoxUI$1;->val$activity:Lorg/microemu/android/MicroEmulatorActivity;

    invoke-direct {v2, v3}, Landroid/widget/EditText;-><init>(Landroid/content/Context;)V

    invoke-static {v1, v2}, Lorg/microemu/android/device/ui/AndroidTextBoxUI;->access$002(Lorg/microemu/android/device/ui/AndroidTextBoxUI;Landroid/widget/EditText;)Landroid/widget/EditText;

    .line 68
    iget-object v1, p0, Lorg/microemu/android/device/ui/AndroidTextBoxUI$1;->this$0:Lorg/microemu/android/device/ui/AndroidTextBoxUI;

    invoke-static {v1}, Lorg/microemu/android/device/ui/AndroidTextBoxUI;->access$000(Lorg/microemu/android/device/ui/AndroidTextBoxUI;)Landroid/widget/EditText;

    move-result-object v1

    iget-object v2, p0, Lorg/microemu/android/device/ui/AndroidTextBoxUI$1;->val$textBox:Ljavax/microedition/lcdui/TextBox;

    invoke-virtual {v2}, Ljavax/microedition/lcdui/TextBox;->getString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    .line 69
    iget-object v1, p0, Lorg/microemu/android/device/ui/AndroidTextBoxUI$1;->this$0:Lorg/microemu/android/device/ui/AndroidTextBoxUI;

    invoke-static {v1}, Lorg/microemu/android/device/ui/AndroidTextBoxUI;->access$000(Lorg/microemu/android/device/ui/AndroidTextBoxUI;)Landroid/widget/EditText;

    move-result-object v1

    new-instance v2, Landroid/widget/LinearLayout$LayoutParams;

    invoke-direct {v2, v4, v4}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V

    invoke-virtual {v1, v2}, Landroid/widget/EditText;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 70
    iget-object v1, p0, Lorg/microemu/android/device/ui/AndroidTextBoxUI$1;->val$textBox:Ljavax/microedition/lcdui/TextBox;

    invoke-virtual {v1}, Ljavax/microedition/lcdui/TextBox;->getConstraints()I

    move-result v1

    and-int/lit8 v1, v1, 0x4

    if-eqz v1, :cond_0

    .line 71
    iget-object v1, p0, Lorg/microemu/android/device/ui/AndroidTextBoxUI$1;->this$0:Lorg/microemu/android/device/ui/AndroidTextBoxUI;

    invoke-static {v1}, Lorg/microemu/android/device/ui/AndroidTextBoxUI;->access$000(Lorg/microemu/android/device/ui/AndroidTextBoxUI;)Landroid/widget/EditText;

    move-result-object v1

    invoke-virtual {v1, v5}, Landroid/widget/EditText;->setSingleLine(Z)V

    .line 73
    :cond_0
    iget-object v1, p0, Lorg/microemu/android/device/ui/AndroidTextBoxUI$1;->val$textBox:Ljavax/microedition/lcdui/TextBox;

    invoke-virtual {v1}, Ljavax/microedition/lcdui/TextBox;->getConstraints()I

    move-result v1

    const/high16 v2, 0x1

    and-int/2addr v1, v2

    if-eqz v1, :cond_1

    .line 74
    iget-object v1, p0, Lorg/microemu/android/device/ui/AndroidTextBoxUI$1;->this$0:Lorg/microemu/android/device/ui/AndroidTextBoxUI;

    invoke-static {v1}, Lorg/microemu/android/device/ui/AndroidTextBoxUI;->access$000(Lorg/microemu/android/device/ui/AndroidTextBoxUI;)Landroid/widget/EditText;

    move-result-object v1

    invoke-static {}, Landroid/text/method/PasswordTransformationMethod;->getInstance()Landroid/text/method/PasswordTransformationMethod;

    move-result-object v2

    invoke-virtual {v1, v2}, Landroid/widget/EditText;->setTransformationMethod(Landroid/text/method/TransformationMethod;)V

    .line 75
    iget-object v1, p0, Lorg/microemu/android/device/ui/AndroidTextBoxUI$1;->this$0:Lorg/microemu/android/device/ui/AndroidTextBoxUI;

    invoke-static {v1}, Lorg/microemu/android/device/ui/AndroidTextBoxUI;->access$000(Lorg/microemu/android/device/ui/AndroidTextBoxUI;)Landroid/widget/EditText;

    move-result-object v1

    sget-object v2, Landroid/graphics/Typeface;->MONOSPACE:Landroid/graphics/Typeface;

    invoke-virtual {v1, v2}, Landroid/widget/EditText;->setTypeface(Landroid/graphics/Typeface;)V

    .line 77
    :cond_1
    iget-object v1, p0, Lorg/microemu/android/device/ui/AndroidTextBoxUI$1;->this$0:Lorg/microemu/android/device/ui/AndroidTextBoxUI;

    iget-object v1, v1, Lorg/microemu/android/device/ui/AndroidTextBoxUI;->view:Landroid/view/View;

    check-cast v1, Landroid/widget/LinearLayout;

    iget-object v2, p0, Lorg/microemu/android/device/ui/AndroidTextBoxUI$1;->this$0:Lorg/microemu/android/device/ui/AndroidTextBoxUI;

    invoke-static {v2}, Lorg/microemu/android/device/ui/AndroidTextBoxUI;->access$000(Lorg/microemu/android/device/ui/AndroidTextBoxUI;)Landroid/widget/EditText;

    move-result-object v2

    invoke-virtual {v1, v2}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V

    .line 79
    iget-object v1, p0, Lorg/microemu/android/device/ui/AndroidTextBoxUI$1;->this$0:Lorg/microemu/android/device/ui/AndroidTextBoxUI;

    invoke-virtual {v1}, Lorg/microemu/android/device/ui/AndroidTextBoxUI;->invalidate()V

    .line 80
    return-void
.end method
